package lxh.grails.basic;


def m = ["name":"lxh", "id":100];
println m.size();
println m.name+" "+m.id;
println m["name"]+" "+m["id"]
m.each{print "${it}"}
println "";
m.each{println it.key + " " + it.value}

def m2 = [:];
println m2.size();
m2.put("age",20);
m2.date = new Date();
println m2.get("date");

def m3 = [memo:"test..."];
m3.id = 10;
m3.name = "aaa";
m3.each
{
	print it.key+"="+it.value + " ";
}

println ""
def printMap = 
{
	key, value->
	print key+"="+value+"|";
}
m3.each(printMap);
m3.keySet().each({print m3[it]+" "})
